﻿<Window x:Class="ClassBuilder.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ItoC="clr-namespace:ClassBuilder"
        Title="ClassBuilder" Height="500" Width="900" Icon="/ClassBuilder;component/Huckleberry-Hound.ico" MaxWidth="900" MaxHeight="500" MinHeight="500" MinWidth="900" ResizeMode="CanMinimize">
    <Window.Resources>
        <!--<ItoC:ItemtoColor x:Key ="FormatConverter" />-->
        <SolidColorBrush x:Key="bgcolor" Color="LightSteelBlue"/>
    </Window.Resources>
    
    <Grid Background="{StaticResource bgcolor}">
        <Rectangle Height="24" HorizontalAlignment="Left" Margin="146,26,0,0" Name="rectangle3" Stroke="Black" VerticalAlignment="Top" Width="119" Fill="#FF190000" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="109,26,0,0" Name="textBlock1" Text="Class" VerticalAlignment="Top" Width="32" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="141,23,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Text="UntitledClass" />
        
        <Button Content="Add Property" Height="23" HorizontalAlignment="Left" Margin="10,76,0,0" Name="button1" VerticalAlignment="Top" Width="91" Click="button1_Click" >
            <Button.Effect>
                <DropShadowEffect ShadowDepth="3"/>
            </Button.Effect>
        </Button>
        <Button Content="Delete" Height="23" HorizontalAlignment="Left" Margin="406,47,0,0" Name="button2" VerticalAlignment="Top" Width="75" Click="button2_Click" IsEnabled="False" />
        <Button Content="Add Field" Height="23" HorizontalAlignment="Left" Margin="10,105,0,0" Name="button3" VerticalAlignment="Top" Width="91" Click="button3_Click" />
        <ListBox ItemsSource="{Binding}"
                 Height="365"
                 HorizontalAlignment="Left"
                 Margin="141,76,0,0"
                 Name="lstProps"
                 VerticalAlignment="Top"
                 Width="340"
                 BorderThickness="2"
                 SelectionChanged="lstProps_SelectionChanged"
                 AllowDrop="True"
                 Drop="filedropped">
            <ListBox.ItemTemplate>
                <DataTemplate > 
                    
                    <Grid Height="35" >
                <StackPanel Name="SP1" Orientation="Horizontal"
                            
                            Opacity=".85">
                       
                            <ComboBox Width="77" Text="{Binding propscope}" IsEditable="True" Height="25" >
                             <ComboBoxItem Content="Private" />
                        <ComboBoxItem Content="Public" />
                    </ComboBox>
                       
                        <ComboBox Width="89" Text="{Binding proptype}" IsEditable="True" Height="25">
                        <ComboBoxItem Content="Integer" />
                        <ComboBoxItem Content="String" />
                        <ComboBoxItem Content="Decimal" />
                                <ComboBoxItem Content="Double" />
                                <ComboBoxItem Content="void" />
                                <ComboBoxItem />
                    </ComboBox>
                        <TextBox Width="78" Text="{Binding propname}" Height="25"/>
                            <Grid Width="40">
                                <CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding propreadonly}"/>
                            </Grid>
                                
                        </StackPanel> 
                    </Grid>

                   <!--!-->
                   <!--Colors for Properties Methods and Fields-->
                   <!--!-->
                    <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding propitem}" Value="P">
                            <Setter TargetName="SP1" Property="Background" Value="Yellow"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding propitem}" Value="F">
                            <Setter TargetName="SP1" Property="Background" Value="Green"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding propitem}" Value="M">
                            <Setter TargetName="SP1" Property="Background" Value="Blue"></Setter>
                        </DataTrigger>
                    </DataTemplate.Triggers>
                    <!--!-->
                    <!--!-->
                    <!--!-->
                    
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.Effect>
                <DropShadowEffect></DropShadowEffect>
            </ListBox.Effect>
        </ListBox>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="510,76,0,0" Name="textBox2" VerticalAlignment="Top" Width="299" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" BorderThickness="2" >
            <TextBox.Effect>
                <DropShadowEffect></DropShadowEffect>
            </TextBox.Effect></TextBox>
        <Button Content="Generate VB Code" Height="23" HorizontalAlignment="Right" Margin="0,47,248,0" Name="button4" VerticalAlignment="Top" Width="121" Click="button4_Click" >
            <Button.Effect>
                <DropShadowEffect ShadowDepth="3"/>
            </Button.Effect>
        </Button>
        <CheckBox Content="Blank Constructor" Height="16" HorizontalAlignment="Left" Margin="12,203,0,0" Name="checkBox1" VerticalAlignment="Top" IsChecked="True" Checked="checkBox1_Checked" />
        <CheckBox Content="Full Constructor" Height="16" HorizontalAlignment="Left" Margin="12,225,0,0" Name="checkBox2" VerticalAlignment="Top" IsChecked="True" Checked="checkBox2_Checked" />
        <Button Content="Add Method" Height="23" HorizontalAlignment="Left" Margin="10,0,0,304" Name="button6" VerticalAlignment="Bottom" Width="91" Click="button6_Click" />
        <Button Content="Clear" Height="23" HorizontalAlignment="Left" Margin="12,426,0,0" Name="button5" VerticalAlignment="Top" Width="75" Click="button5_Click" />
        <Menu Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Name="menu1" VerticalAlignment="Top" Background="{StaticResource bgcolor}" >
            <MenuItem Header="_File">
                <MenuItem Name="menuitemLoadMetaData" Header="Load MetaData" Click="LoadMetaDataClick"></MenuItem>
                <MenuItem Name="menuitemSaveMetaData" Header="Save MetaData" Click="SaveMetaDataClick"></MenuItem>
                <Separator/>
                <MenuItem Name="menuitemQuit" Header="Quit" Click="menuitemQuit_Click"></MenuItem>
            </MenuItem>
            <MenuItem Header="_Help">
                <MenuItem Header="About" Click="AboutClicked"></MenuItem>
                </MenuItem>
        </Menu>
        <Button Content="Generate C# Code" Height="23" HorizontalAlignment="Right" Margin="0,47,69,0" Name="button7" VerticalAlignment="Top" Width="120" Click="button7_Click" />
        <CheckBox Content="Auto Properties" Height="16" HorizontalAlignment="Left" Margin="13,247,0,0" Name="chkAutoProp" VerticalAlignment="Top" Checked="chkAutoProp_Checked" />
    </Grid>
</Window>
